[Observability] Introduce property for tool server name#187
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new "ToolServerName" property to the ToolCallDetails class to enable icon mapping at the server (workload) level rather than the individual tool level. This improves UX by eliminating the need for UI changes when new tools are added.
Changes:
- Added optional
toolServerNameparameter toToolCallDetailsclass constructor and corresponding property - Added
GenAiToolServerNameKeyconstant toOpenTelemetryConstantsfor consistent telemetry tagging - Updated
ExecuteToolScopeandExecuteToolDataBuilderto handle the new property - Added comprehensive test coverage for the new functionality
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Observability/Runtime/Tracing/Contracts/ToolCallDetails.cs | Added ToolServerName property, constructor parameter, and updated Equals/GetHashCode/Deconstruct methods |
| src/Observability/Runtime/Tracing/Scopes/OpenTelemetryConstants.cs | Added GenAiToolServerNameKey constant for telemetry attribute |
| src/Observability/Runtime/Tracing/Scopes/ExecuteToolScope.cs | Updated to extract and set the toolServerName tag from ToolCallDetails |
| src/Observability/Runtime/DTOs/Builders/ExecuteToolDataBuilder.cs | Updated to include toolServerName in telemetry attributes |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Scopes/ExecuteToolScopeTest.cs | Added test to verify ToolServerName is set correctly in the scope |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/ExecuteToolDataBuilderTests.cs | Updated tests to verify toolServerName is included in attributes and omitted when null |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.IntegrationTests/Agent365ExporterE2ETests.cs | Updated E2E test to validate toolServerName in exported telemetry |
nikhilNava
approved these changes
Jan 20, 2026
juliomenendez
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Today the UX map icons at the tool level, which requires UI changes every time a new tool is added. If we log the server name along with the tool name, we can map icons at the server (workload) level instead. This gives us one icon per workload, and tools automatically inherit the correct icon, so new tools work without UI changes.
What?
Introduce a new "ToolServerName" property in ToolCallDetails in the ExecuteTool scope.